package pl.ydp.storage.events
{
	import flash.events.Event;
	
	/**
	 * Class specifies format of events that are dispatched by the IResource instances
	 * @see pl.ydp.storage.IResource  
	 */
	 
	public class StorageEvent extends Event
	{
		
		/**
		 * additional information about the event ( in example: name of the uploaded file ) 
		 * 
		 */ 
		public var status:Object;
		
		/**
		 * additional information about the event e.g.: list of files in uploaded zip
		 * @see SharedMediaBrowser#uploadCompleteDataHandler
		 */
		public var data:String;
		
		public static const LOAD_COMPLETED:String = "fileLoadCompleted";
		public static const PUT_COMPLETED:String = "putFileCompleted";
		public static const EXTRACT_COMPLETED:String = "extractFileCompleted";
		public static const COPY_COMPLETED:String = "copyFileCompleted";
		public static const SAVE_COMPLETED:String = "saveFileCompleted";
		public static const PUT_STARTED:String = "putFileStarted";
		public static const REMOVE_COMPLETED:String = "removeFileCompleted";
		public static const PROPERTY_LIST_COMPLETE:String = "propertyListComplete";
		public static const MAKE_ICON_COMPLETE:String = "makeIconComplete";
		public static const PUT_SELECT_CANCELED:String = "putSelectCancel";
		public static const SET_BEGIN_COMPLETED:String = "setBeginCompleted";
		public static const SET_END_COMPLETED:String = "setEndCompleted";
		public static const PING_COMPLETED:String = "pingCompleted";
		public static const CREATE_DIR_COMPLETED:String = "createDirCompleted";
		
		
		/**
		 * Class contructor
		 * @param _status additional information about the event
		 * @param type const defined by StorageEvent static properties
		 */	
		public function StorageEvent(type:String, _status:Object = "" )
		{
			status = _status;
			super (type);
		}
	}
}